package cn.edu.scau.dormitory_management_system.service.impl;

import cn.edu.scau.dormitory_management_system.dao.DepartmentDao;
import cn.edu.scau.dormitory_management_system.entity.DepartmentEntity;
import cn.edu.scau.dormitory_management_system.service.DepartmentService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author ：Vizzk
 * @description：TODO
 * @date ：2021/8/8 11:01
 */
@Service("departmentService")
public class DepartmentServiceImpl extends ServiceImpl<DepartmentDao, DepartmentEntity> implements DepartmentService {
    @Override
    public IPage<DepartmentEntity> listAllDepts(Integer pageNum, Integer pageSize) {
        IPage<DepartmentEntity> page = new Page<>(pageNum, pageSize);
        page = this.baseMapper.selectPage(page,null);
        return page;
    }
}
